<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="commons/taglib.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="${ctx }/static/css/pintuer.css">
<link rel="stylesheet" href="${ctx }/static/css/admin.css">
<script src="${ctx }/static/js/jquery.js"></script>
<script src="${ctx }/static/js/pintuer.js"></script>
</head>
<body>
	<form method="post" action="">
		<div class="panel admin-panel">
			<div class="panel-head">
				<strong class="icon-reorder"> 病历管理</strong>
			</div>

			<button id="js-export" type="button" class="btn btn-primary">导出Excel</button>

			<table class="table table-hover text-center">
				<tr>
					<th width="120">ID</th>
					<th>医院名</th>
					<th>疾病</th>
					<th>处方</th>
					<th>金额</th>
					<th width="120">时间</th>
					<th>操作</th>
				</tr>

				<c:forEach items="${ caseHistery }" var="caseHistery">
					<tr>
						<td><input type="checkbox" name="id[]"
							value="${caseHistery.branchCourts}" /> ${caseHistery.id }</td>
						<td>${caseHistery.branchCourts }</td>
						<td>${caseHistery.disease }</td>
						<td>${caseHistery.drug }</td>
						<td>${caseHistery.payment }</td>
						<td>${caseHistery.date }</td>
						<td><div class="button-group">
								<a class="button border-red" href="javascript:void(0)"
									onclick="return del(${caseHistery.id})"><span
									class="icon-trash-o"></span> 删除</a>
							</div></td>
					</tr>
				</c:forEach>

				<!-- <tr>
          <td><input type="checkbox" name="id[]" value="1" />
            1</td>
          <td>神夜</td>
          <td>13420925611</td>
          <td>564379992@qq.com</td>  
           <td>深圳市民治街道</td>         
          <td>这是一套后台UI，喜欢的朋友请多多支持谢谢。</td>
          <td>2016-07-01</td>
          <td><div class="button-group"> <a class="button border-red" href="javascript:void(0)" onclick="return del(1)"><span class="icon-trash-o"></span> 删除</a> </div></td>
        </tr> -->

				<tr>
					<td colspan="8"><div class="pagelist">
							<a href="">上一页</a> <span class="current">1</span><a href="">2</a><a
								href="">3</a><a href="">下一页</a><a href="">尾页</a>
						</div></td>
				</tr>
			</table>
		</div>
	</form>
	<script type="text/javascript">

function del(id){
	if(confirm("删除后的数据不可恢复，请慎重选择！")){
		window.location.href="deleCaseHistery?id=" + id;       
		//通过confirm来跳转页面,并传入对应的id
	}
}

$("#checkall").click(function(){ 
  $("input[name='id[]']").each(function(){
	  if (this.checked) {
		  this.checked = false;
	  }
	  else {
		  this.checked = true;
	  }
  });
})

function DelSelect(){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){
		var t=confirm("删除后的数据不可恢复，请慎重选择！？");
		if (t==false) return false; 		
	}
	else{
		alert("请选择您要删除的内容!");
		return false;
	}
}

$('#js-export').click(function(){
	window.location.href="exportfeedback?type="+$('#type').val()+"&startDate="+$('#table_start_date').val()+"&endDate="+$('#table_end_date').val();
	});

</script>
	${message};
	<c:forEach items="${caseHistery}">
		<div class="content2-body1">
			<div class="content2-body1-right">
				<label>caseHistery.disease</label>
			</div>
			<div class="content2-body1-right-text">
				caseHistery.drug.drug</div>
		</div>
	</c:forEach>
	
	${caseHistery}
</body>
</html>


	
	
	
	
	
	



</body>
</html>